/*
 * ClienteFacadeBean.java
 *
 * Created on 5 de Junho de 2007, 22:05
 *
 */

package net.sf.jOpinionPoll.facade.impl;

import java.util.List;

import net.sf.jOpinionPoll.dao.ClienteDao;
import net.sf.jOpinionPoll.dao.ParameterMap;
import net.sf.jOpinionPoll.entity.Cliente;
import net.sf.jOpinionPoll.facade.ClienteFacade;

/**
 *
 * @author erico
 */
@SuppressWarnings("unchecked")
public class ClienteFacadeImpl implements ClienteFacade {
    private ClienteDao m_ClienteDao;
    
    public void setClienteDao(ClienteDao clienteDao) {
    	m_ClienteDao = clienteDao;
    }
    
    @Override
    public Cliente findByPk(int id) {
        return m_ClienteDao.findByPk(id);
    }
    
    @Override
    public void add(Cliente cliente) {
   		m_ClienteDao.add(cliente);
    }
    
    @Override
    public void set(Cliente cliente) {
        m_ClienteDao.set(cliente);
    }
    
    @Override
    public void remove(Cliente cliente) {
        m_ClienteDao.remove(cliente);
    }
    
    @Override
    public int count() {
        return m_ClienteDao.count();
    }
    
	@Override
	public List<Cliente> listByParameters(int startReg, int length, ParameterMap parameterMap) {
        return m_ClienteDao.list(startReg, length, parameterMap);
	}
}